<%--
  Created by IntelliJ IDEA.
  User: Root404
  Date: 2023/5/15
  Time: 14:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--//判断非法入侵--%>
<%
    Cookie[] cookies = request.getCookies();
    if(cookies!=null){
        for(int i=0;i<cookies.length;i++){
            if(cookies[i]!=null&&cookies[i].getName().equals("user")){
                break;
            }if(i==cookies.length-1){
                response.sendRedirect("login.jsp?feifa=t");
            }
        }
    }
%>

<h2><%=session.getId()%></h2>
<%--        //<h1>欢迎+ <%=request.getParameter("name")%> </h1>--%>
        <h1>欢迎+ <%=(String)session.getAttribute("user")%> </h1>
<% String[] cks = request.getParameterValues("ck");
  if(cks!=null){
        for(String xjj : cks){
            out.print(xjj+"---");
        }
   }
%>
<a href="loginout.jsp">点我注销</a>
</body>
</html>
